# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: hauptmech, figo.zhang, chubtuff, lubosz
#
# Matlab bindings are not built by default to reduce dependencies.

pkgname=gl2ps
pkgver=1.3.9
pkgrel=1
pkgdesc="an OpenGL to PostScript printing library"
arch=('i686' 'x86_64')
url='http://geuz.org/gl2ps/'
license=('LGPL')
depends=('libpng' 'libgl')
makedepends=('cmake' 'texlive-core')
source=("http://geuz.org/gl2ps/src/gl2ps-${pkgver}.tgz")
sha512sums=('e6770c27d4832a300b4e16a9f98deb8557e7875460e7aa7e655fdb796f5dfffd5eccdc8b15f5a3ae151713fc46f97dacad48ee7550c41373b6fc8cfd21a437cb')

prepare() {
  mkdir build
}

build() {
  cd build
  cmake ../gl2ps-$pkgver-source \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_EXE_LINKER_FLAGS=-lm
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir/" install
}

